<script src="jquery-1.8.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  
  jQuery('#showId').click(function(){
     var html = $('.container').html();
     alert(html)
  });    
  jQuery('#hideId').click(function(){
     var text = $('.container').text();
     alert(text)
  });  
});
</script>
<div class="container">
HEllo This is text in <strong>container</strong> div.HEllo This is text in <strong>container</strong> div.
</div>

<p>
  <span id="showId">get HTML</span>
<p>

<p>
  <span id="hideId">get TEXT</span>
<p>